const webpack = require('webpack');

module.exports = {
  entry: "./index.js",
  output: {
	path: __dirname + "/css/dist",
	publicPath: '../css/dist/',
    filename: "../../js/build.js",
	libraryTarget : 'var'
  },
  module: {
    loaders: [
      { test: /\.css$/, loader: "style-loader!css-loader" },
      { test: /\.js$/,    loader: "babel-loader" },
	  {test: /\.(png|jpg|jpeg|gif|svg|woff|woff2|ttf|eot)$/, loader: "file-loader" }
    ]
  },
  resolve: {
    extensions: ['.css', '.js'],
	alias: {
		// 'jquery': './lib/js/jquery.min.js'
    }
  },
  plugins: [
    new webpack.optimize.UglifyJsPlugin({
	  warnings: false,
      output:{ comments: false	},
	  compress: {
		join_vars: true,
        warnings: false
      }
    })
  ],
  externals: { 'jquery': 'window.jQuery' }
};